home *** CD-ROM | disk | FTP | other *** search
/ Windows News 2010 Summer - Disc 1 / WN_Ete2010_CD1.iso / Onglet5 / Weezo / Weezo setup.exe / {code_appDir} / www / themes / nature / background.php next >
PHP Script  |  2010-05-19  |  5KB  |  108 lines

  1. <?php
  2. require_once('outputFunctions.php');
  3. require_once('framesFunctions.php');
  4. /**
  5.  * @desc Insert HTML code for bottom menu bar
  6.  *
  7.  */
  8. function displayMenu(){
  9.     echo '<div id="winBarOuter" class="menuFrameBody" style="overflow:hidden;position:absolute;height:30px;width:100%;left:0;bottom:0">';
  10.     echo outTableTransparent("menuBar",'margin-top:0px');
  11.     echo '<colgroup><col width="1"><col width="*"><col width="55"></colgroup>';
  12.     echo "<tr><td style='display:block'>\n";
  13.     echo outBt(cfCaption('genResources'),outIcon('logoSmall'),"javascript:menuToggle()",false,false,'style="margin-left:5px"','up');
  14.     echo "</td><td id='winOpenedOuter' style='white-space:nowrap;overflow:hidden'>\n";
  15.     fInsertWindowsBar('150px');
  16.     echo '</td><td id="timeDiv" style="display:block;position:relative; width:100px">';
  17.  
  18.     // Async request indicator
  19.     echo outImage(outIcon('onSmall'),false,'id="asyncRequestIndicator"','position:absolute;left:-18px;top:0px !important; top:5px;visibility:hidden');
  20.  
  21.     // Config button
  22.     echo outButton('','javascript:'.fConfigLink(),outIcon('config3'),cfCaption('mainConfigButton')).' ';
  23.  
  24.     // Hour/min/sec clock javascript
  25.     fInsertClock(true,true);
  26.     echo "</td></table></div>\n";
  27. }
  28.  
  29. ?>
  30.  
  31. <script language="javascript" type="text/javascript">
  32. var iconWidth=70;
  33. var iconHeight=70;
  34. var menuShown=false;
  35.  
  36. // Send windows events to menu frame
  37. function winMonitor(win,action){menuWin(action, win.id, win.getIcon(), win.getCaption());}
  38.  
  39. </script>
  40. <?php
  41. // Insert menu javascript and background mask
  42. fInsertMenuStuff(2,1);
  43.  
  44.  
  45. /**
  46.  * XP-Style menu
  47.  */
  48. echo '<div id="menu" class="menu">';
  49.  
  50. echo outShadowBefore();
  51.  
  52. // Menu "white" frame
  53. echo '<table class="menuInnerDiv"><tr><td class="menuLeft">W<br>E<br>E<br>Z<br>O</td><td class="menuRight"'.outEHoverFrameAttr().'>';
  54.  
  55. // Grouping
  56. $types=array('administration'=>cfCaption('resAdministration'), 'explorer'=>cfCaption('resExplorer'), 'webcam'=>cfCaption('resWebcam'), 'website'=>cfCaption('resWebsite'), 'blog'=>cfCaption('resBlog'), 'bookmarks'=>cfCaption('resBookmarks'), 'tv'=>cfCaption('resTv'), 'misc'=>cfCaption('resMisc'));
  57. $i=0;
  58. // Group by resource type
  59. $resources=cfResourcesGetUser();
  60. foreach ($types as $type=>$caption){
  61.     $output='';
  62.     // Foreach resource of group
  63.     foreach($resources as $value) if($value['type']==$type){
  64.         $output.=outETC('menu'.$i,'onclick="javascript:menuHide();'.$value['resourceJsLink'].'"','<img alt="" src="'.$value['definition']['resourceIconSmall'].'" style="vertical-align:middle;margin-right:5px;height:16px;width:16px">'.cfUTF8Encode($value['name']),0,true);
  65.         $i++;
  66.     }
  67.     if($output) {
  68.         echo '<div class="menuGroup"><span style="background:white">'.$caption.'  </span></div>'.$output;
  69.         $i++;
  70.     }
  71. }
  72.  
  73. // Separator
  74. echo '<center><div style="margin:0.8em;width:150px;height:0px;line-height:0px;border-top:0px solid #dcfcdb; border-bottom:1px solid #9dd690"></div></center>';
  75.  
  76. // Theme selection control
  77. if(cfGGetVar('allowUserThemeChange')) echo '<div id="themeControl" style="">'.outThemeSelectionControl('user',true,'GET', 'onmouseover="doCancelSelection=false;" onmouseout="doCancelSelection=true;"').'</div>';
  78.  
  79. // Separator
  80. echo '<center><div style="margin:0.8em;width:150px;height:0px;line-height:0px;border-top:0px solid #dcfcdb; border-bottom:1px solid #9dd690"></div></center>';
  81.  
  82. // Logout button
  83. echo '<span class="normalFont" style="margin-right:1em">'.cfUTF8Encode(cfUGetVar('name')).'</span>'.outBt('   '.cfCaption('genLogout'),outIcon('off'),'javascript:logout();',false, false,'style=""','up',false);
  84.  
  85. echo "</td></tr></table>\n"; // end of menuInnerDiv
  86.  
  87. // User name
  88. //echo '<div style="position:absolute;top:112px;left:260px;width:180px;text-align:center;color:white;font-size:16px">'.cfUTF8Encode(cfUGetVar('name')).'</div>';
  89.  
  90. outShadowAfter();
  91. echo "</div>\n"; // End of menu
  92.  
  93. /**
  94.  * Background
  95.  */
  96. echo '<span style="color:white; position:absolute;top:7px; right:7px;cursor:pointer" onclick="window.open(\''.APP_SITE.'\',\'_blank\')">Weezo - '.cfGGetVar('appVersion').' '.outImage(outIcon('logoSmall'),false,false,'vertical-align:middle; margin-left:0.5em').'</span>';
  97.  
  98.  
  99. echo '<span onclick="window.open(\''.APP_SITE.'\')" style="color:#7FCF66; cursor:pointer; position:absolute;top:7px; right:7px">Weezo - '.cfGGetVar('appVersion').' '.outImage(outIcon('logoSmall'),'#',false,'vertical-align:top; margin-left:1em').'</span>';
  100.  
  101. if(!$wallpaper) echo '<img alt="" src="/themes/nature/bg.jpg" style="position:absolute;bottom:30">';
  102.  
  103. displayMenu();
  104.  
  105. ?>
  106. <script type="text/javascript">
  107. var loading=new Image; loading.src="<?php echo outIcon('loadingBig'); ?>";
  108. </script>